# -*- mode: python ; coding: utf-8 -*-

import os

a = Analysis(
    ['main.py'],
    pathex=[],
    binaries=[],
    datas=[('icon.ico', '.')],
    hiddenimports=[],
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=[
        # 你未用到的 PyQt 模块
        'PyQt5.QtWebEngineWidgets', 'PyQt5.QtWebEngineCore', 'PyQt5.QtWebEngine',
        'PyQt5.QtPrintSupport', 'PyQt5.QtSql', 'PyQt5.QtMultimedia', 'PyQt5.QtBluetooth',
        'PyQt5.QtNetwork', 'PyQt5.QtPositioning', 'PyQt5.QtQuick', 'PyQt5.QtQml',
        'PyQt5.QtOpenGL', 'PyQt5.QtDesigner', 'PyQt5.QtHelp', 'PyQt5.QtTest',
        'PyQt5.QtSerialPort', 'PyQt5.QtXml', 'PyQt5.QtSvg', 'PyQt5.QtSensors',
        'PyQt5.QtWebSockets', 'PyQt5.Qt3DCore', 'PyQt5.Qt3DRender', 'PyQt5.Qt3DInput',
        'PyQt5.Qt3DLogic', 'PyQt5.Qt3DExtras', 'PyQt5.QtLocation', 'PyQt5.QtNfc',
        'PyQt5.QtRemoteObjects', 'PyQt5.QtTextToSpeech', 'PyQt5.QtWebChannel'
    ],
    noarchive=False,
    optimize=2,
)

pyz = PYZ(a.pure)

exe = EXE(
    pyz,
    a.scripts,
    a.binaries,
    a.datas,
    [],
    name='WorkClock',
    debug=False,
    strip=False,  # Windows 下 strip 无效，可以关闭
    upx=True,     # 启用 UPX
    upx_exclude=[],
    runtime_tmpdir=None,
    console=False,
    icon='icon.ico'
)
